Optimal. Leaf size=247 \[ -\frac {2 a e x}{3 c^2}-\frac {5 b e x^2}{18 c}-\frac {2}{9} a e x^3-\frac {2 b e x \tanh ^{-1}(c x)}{3 c^2}-\frac {2}{9} b e x^3 \tanh ^{-1}(c x)+\frac {b e \tanh ^{-1}(c x)^2}{3 c^3}-\frac {(2 a+b) e \log (1-c x)}{6 c^3}+\frac {(2 a-b) e \log (1+c x)}{6 c^3}-\frac {4 b e \log \left (1-c^2 x^2\right )}{9 c^3}-\frac {b e \log ^2\left (1-c^2 x^2\right )}{12 c^3}+\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.43, antiderivative size = 247, normalized size of antiderivative = 1.00, number of steps
used = 21, number of rules used = 15, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used =
{6037, 272, 45, 6232, 6857, 815, 647, 31, 6127, 6021, 266, 6095, 2525, 2437, 2338}
\begin {gather*} -\frac {e (2 a+b) \log (1-c x)}{6 c^3}+\frac {e (2 a-b) \log (c x+1)}{6 c^3}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (e \log \left (1-c^2 x^2\right )+d\right )-\frac {2 a e x}{3 c^2}-\frac {2}{9} a e x^3+\frac {b e \tanh ^{-1}(c x)^2}{3 c^3}+\frac {b x^2 \left (e \log \left (1-c^2 x^2\right )+d\right )}{6 c}-\frac {2 b e x \tanh ^{-1}(c x)}{3 c^2}+\frac {b \log \left (1-c^2 x^2\right ) \left (e \log \left (1-c^2 x^2\right )+d\right )}{6 c^3}-\frac {b e \log ^2\left (1-c^2 x^2\right )}{12 c^3}-\frac {4 b e \log \left (1-c^2 x^2\right )}{9 c^3}-\frac {2}{9} b e x^3 \tanh ^{-1}(c x)-\frac {5 b e x^2}{18 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 45
Rule 266
Rule 272
Rule 647
Rule 815
Rule 2338
Rule 2437
Rule 2525
Rule 6021
Rule 6037
Rule 6095
Rule 6127
Rule 6232
Rule 6857
Rubi steps
\begin {align*} \int x^2 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right ) \, dx &=\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}+\left (2 c^2 e\right ) \int \left (-\frac {x^3 \left (b+2 a c x+2 b c x \tanh ^{-1}(c x)\right )}{6 c \left (-1+c^2 x^2\right )}-\frac {b x \log \left (1-c^2 x^2\right )}{6 c^3 \left (-1+c^2 x^2\right )}\right ) \, dx\\ &=\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}-\frac {(b e) \int \frac {x \log \left (1-c^2 x^2\right )}{-1+c^2 x^2} \, dx}{3 c}-\frac {1}{3} (c e) \int \frac {x^3 \left (b+2 a c x+2 b c x \tanh ^{-1}(c x)\right )}{-1+c^2 x^2} \, dx\\ &=\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}-\frac {(b e) \text {Subst}\left (\int \frac {\log \left (1-c^2 x\right )}{-1+c^2 x} \, dx,x,x^2\right )}{6 c}-\frac {1}{3} (c e) \int \left (\frac {x^3 (b+2 a c x)}{-1+c^2 x^2}+\frac {2 b c x^4 \tanh ^{-1}(c x)}{-1+c^2 x^2}\right ) \, dx\\ &=\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}-\frac {(b e) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1-c^2 x^2\right )}{6 c^3}-\frac {1}{3} (c e) \int \frac {x^3 (b+2 a c x)}{-1+c^2 x^2} \, dx-\frac {1}{3} \left (2 b c^2 e\right ) \int \frac {x^4 \tanh ^{-1}(c x)}{-1+c^2 x^2} \, dx\\ &=-\frac {b e \log ^2\left (1-c^2 x^2\right )}{12 c^3}+\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}-\frac {1}{3} (2 b e) \int x^2 \tanh ^{-1}(c x) \, dx-\frac {1}{3} (2 b e) \int \frac {x^2 \tanh ^{-1}(c x)}{-1+c^2 x^2} \, dx-\frac {1}{3} (c e) \int \left (\frac {2 a}{c^3}+\frac {b x}{c^2}+\frac {2 a x^2}{c}+\frac {2 a+b c x}{c^3 \left (-1+c^2 x^2\right )}\right ) \, dx\\ &=-\frac {2 a e x}{3 c^2}-\frac {b e x^2}{6 c}-\frac {2}{9} a e x^3-\frac {2}{9} b e x^3 \tanh ^{-1}(c x)-\frac {b e \log ^2\left (1-c^2 x^2\right )}{12 c^3}+\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}-\frac {e \int \frac {2 a+b c x}{-1+c^2 x^2} \, dx}{3 c^2}-\frac {(2 b e) \int \tanh ^{-1}(c x) \, dx}{3 c^2}-\frac {(2 b e) \int \frac {\tanh ^{-1}(c x)}{-1+c^2 x^2} \, dx}{3 c^2}+\frac {1}{9} (2 b c e) \int \frac {x^3}{1-c^2 x^2} \, dx\\ &=-\frac {2 a e x}{3 c^2}-\frac {b e x^2}{6 c}-\frac {2}{9} a e x^3-\frac {2 b e x \tanh ^{-1}(c x)}{3 c^2}-\frac {2}{9} b e x^3 \tanh ^{-1}(c x)+\frac {b e \tanh ^{-1}(c x)^2}{3 c^3}-\frac {b e \log ^2\left (1-c^2 x^2\right )}{12 c^3}+\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}+\frac {((2 a-b) e) \int \frac {1}{c+c^2 x} \, dx}{6 c}+\frac {(2 b e) \int \frac {x}{1-c^2 x^2} \, dx}{3 c}-\frac {((2 a+b) e) \int \frac {1}{-c+c^2 x} \, dx}{6 c}+\frac {1}{9} (b c e) \text {Subst}\left (\int \frac {x}{1-c^2 x} \, dx,x,x^2\right )\\ &=-\frac {2 a e x}{3 c^2}-\frac {b e x^2}{6 c}-\frac {2}{9} a e x^3-\frac {2 b e x \tanh ^{-1}(c x)}{3 c^2}-\frac {2}{9} b e x^3 \tanh ^{-1}(c x)+\frac {b e \tanh ^{-1}(c x)^2}{3 c^3}-\frac {(2 a+b) e \log (1-c x)}{6 c^3}+\frac {(2 a-b) e \log (1+c x)}{6 c^3}-\frac {b e \log \left (1-c^2 x^2\right )}{3 c^3}-\frac {b e \log ^2\left (1-c^2 x^2\right )}{12 c^3}+\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}+\frac {1}{9} (b c e) \text {Subst}\left (\int \left (-\frac {1}{c^2}-\frac {1}{c^2 \left (-1+c^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=-\frac {2 a e x}{3 c^2}-\frac {5 b e x^2}{18 c}-\frac {2}{9} a e x^3-\frac {2 b e x \tanh ^{-1}(c x)}{3 c^2}-\frac {2}{9} b e x^3 \tanh ^{-1}(c x)+\frac {b e \tanh ^{-1}(c x)^2}{3 c^3}-\frac {(2 a+b) e \log (1-c x)}{6 c^3}+\frac {(2 a-b) e \log (1+c x)}{6 c^3}-\frac {4 b e \log \left (1-c^2 x^2\right )}{9 c^3}-\frac {b e \log ^2\left (1-c^2 x^2\right )}{12 c^3}+\frac {b x^2 \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )+\frac {b \log \left (1-c^2 x^2\right ) \left (d+e \log \left (1-c^2 x^2\right )\right )}{6 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 183, normalized size = 0.74 \begin {gather*} \frac {-24 a c e x+2 b c^2 (3 d-5 e) x^2+4 a c^3 (3 d-2 e) x^3+4 b c x \left (3 c^2 d x^2-2 e \left (3+c^2 x^2\right )\right ) \tanh ^{-1}(c x)+12 b e \tanh ^{-1}(c x)^2+2 (3 b d-6 a e-11 b e) \log (1-c x)+2 (3 b d+6 a e-11 b e) \log (1+c x)+6 c^2 e x^2 \left (b+2 a c x+2 b c x \tanh ^{-1}(c x)\right ) \log \left (1-c^2 x^2\right )+3 b e \log ^2\left (1-c^2 x^2\right )}{36 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 11.62, size = 3994, normalized size = 16.17
method | result | size |
default | \(\text {Expression too large to display}\) | \(3994\) |
risch | \(\text {Expression too large to display}\) | \(4015\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.28, size = 255, normalized size = 1.03 \begin {gather*} \frac {1}{3} \, a d x^{3} + \frac {1}{9} \, {\left (3 \, x^{3} \log \left (-c^{2} x^{2} + 1\right ) - c^{2} {\left (\frac {2 \, {\left (c^{2} x^{3} + 3 \, x\right )}}{c^{4}} - \frac {3 \, \log \left (c x + 1\right )}{c^{5}} + \frac {3 \, \log \left (c x - 1\right )}{c^{5}}\right )}\right )} b \operatorname {artanh}\left (c x\right ) e + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {x^{2}}{c^{2}} + \frac {\log \left (c^{2} x^{2} - 1\right )}{c^{4}}\right )}\right )} b d + \frac {1}{9} \, {\left (3 \, x^{3} \log \left (-c^{2} x^{2} + 1\right ) - c^{2} {\left (\frac {2 \, {\left (c^{2} x^{3} + 3 \, x\right )}}{c^{4}} - \frac {3 \, \log \left (c x + 1\right )}{c^{5}} + \frac {3 \, \log \left (c x - 1\right )}{c^{5}}\right )}\right )} a e + \frac {{\left ({\left (3 i \, \pi c^{2} - 5 \, c^{2}\right )} x^{2} + {\left (3 i \, \pi + 3 \, c^{2} x^{2} + 6 \, \log \left (c x - 1\right ) - 11\right )} \log \left (c x + 1\right ) + {\left (3 i \, \pi + 3 \, c^{2} x^{2} - 11\right )} \log \left (c x - 1\right )\right )} b e}{18 \, c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 306, normalized size = 1.24 \begin {gather*} \frac {12 \, a c^{3} d x^{3} + 6 \, b c^{2} d x^{2} + 3 \, {\left (b \cosh \left (1\right ) + b \sinh \left (1\right )\right )} \log \left (-c^{2} x^{2} + 1\right )^{2} + 3 \, {\left (b \cosh \left (1\right ) + b \sinh \left (1\right )\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )^{2} - 2 \, {\left (4 \, a c^{3} x^{3} + 5 \, b c^{2} x^{2} + 12 \, a c x\right )} \cosh \left (1\right ) + 2 \, {\left (3 \, b d + {\left (6 \, a c^{3} x^{3} + 3 \, b c^{2} x^{2} - 11 \, b\right )} \cosh \left (1\right ) + {\left (6 \, a c^{3} x^{3} + 3 \, b c^{2} x^{2} - 11 \, b\right )} \sinh \left (1\right )\right )} \log \left (-c^{2} x^{2} + 1\right ) + 2 \, {\left (3 \, b c^{3} d x^{3} - 2 \, {\left (b c^{3} x^{3} + 3 \, b c x - 3 \, a\right )} \cosh \left (1\right ) + 3 \, {\left (b c^{3} x^{3} \cosh \left (1\right ) + b c^{3} x^{3} \sinh \left (1\right )\right )} \log \left (-c^{2} x^{2} + 1\right ) - 2 \, {\left (b c^{3} x^{3} + 3 \, b c x - 3 \, a\right )} \sinh \left (1\right )\right )} \log \left (-\frac {c x + 1}{c x - 1}\right ) - 2 \, {\left (4 \, a c^{3} x^{3} + 5 \, b c^{2} x^{2} + 12 \, a c x\right )} \sinh \left (1\right )}{36 \, c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.99, size = 258, normalized size = 1.04 \begin {gather*} \begin {cases} \frac {a d x^{3}}{3} + \frac {a e x^{3} \log {\left (- c^{2} x^{2} + 1 \right )}}{3} - \frac {2 a e x^{3}}{9} - \frac {2 a e x}{3 c^{2}} + \frac {2 a e \operatorname {atanh}{\left (c x \right )}}{3 c^{3}} + \frac {b d x^{3} \operatorname {atanh}{\left (c x \right )}}{3} + \frac {b e x^{3} \log {\left (- c^{2} x^{2} + 1 \right )} \operatorname {atanh}{\left (c x \right )}}{3} - \frac {2 b e x^{3} \operatorname {atanh}{\left (c x \right )}}{9} + \frac {b d x^{2}}{6 c} + \frac {b e x^{2} \log {\left (- c^{2} x^{2} + 1 \right )}}{6 c} - \frac {5 b e x^{2}}{18 c} - \frac {2 b e x \operatorname {atanh}{\left (c x \right )}}{3 c^{2}} + \frac {b d \log {\left (- c^{2} x^{2} + 1 \right )}}{6 c^{3}} + \frac {b e \log {\left (- c^{2} x^{2} + 1 \right )}^{2}}{12 c^{3}} - \frac {11 b e \log {\left (- c^{2} x^{2} + 1 \right )}}{18 c^{3}} + \frac {b e \operatorname {atanh}^{2}{\left (c x \right )}}{3 c^{3}} & \text {for}\: c \neq 0 \\\frac {a d x^{3}}{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.54, size = 244, normalized size = 0.99 \begin {gather*} -\frac {1}{6} \, b e x^{3} \log \left (-c x + 1\right )^{2} + \frac {1}{9} \, {\left (3 \, a d - 2 \, a e\right )} x^{3} + \frac {1}{6} \, {\left (b e x^{3} + \frac {b e}{c^{3}}\right )} \log \left (c x + 1\right )^{2} + \frac {{\left (3 \, b d - 5 \, b e\right )} x^{2}}{18 \, c} + \frac {1}{18} \, {\left ({\left (3 \, b d + 6 \, a e - 2 \, b e\right )} x^{3} + \frac {3 \, b e x^{2}}{c} - \frac {6 \, b e x}{c^{2}}\right )} \log \left (c x + 1\right ) - \frac {1}{18} \, {\left ({\left (3 \, b d - 6 \, a e - 2 \, b e\right )} x^{3} - \frac {3 \, b e x^{2}}{c} - \frac {6 \, b e x}{c^{2}} - \frac {6 \, b e \log \left (c x - 1\right )}{c^{3}}\right )} \log \left (-c x + 1\right ) - \frac {2 \, a e x}{3 \, c^{2}} - \frac {b e \log \left (c x - 1\right )^{2}}{6 \, c^{3}} + \frac {{\left (3 \, b d + 6 \, a e - 11 \, b e\right )} \log \left (c x + 1\right )}{18 \, c^{3}} + \frac {{\left (3 \, b d - 6 \, a e - 11 \, b e\right )} \log \left (c x - 1\right )}{18 \, c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.81, size = 515, normalized size = 2.09 \begin {gather*} \frac {a\,d\,x^3}{3}-\frac {2\,a\,e\,x^3}{9}+\frac {b\,d\,x^3\,\ln \left (c\,x+1\right )}{6}-\frac {b\,d\,x^3\,\ln \left (1-c\,x\right )}{6}-\frac {b\,e\,x^3\,\ln \left (c\,x+1\right )}{9}+\frac {b\,e\,x^3\,\ln \left (1-c\,x\right )}{9}+\frac {b\,e\,{\ln \left (c\,x+1\right )}^2}{6\,c^3}+\frac {b\,e\,{\ln \left (1-c\,x\right )}^2}{6\,c^3}-\frac {2\,a\,e\,x}{3\,c^2}+\frac {b\,d\,x^2}{6\,c}-\frac {5\,b\,e\,x^2}{18\,c}+\frac {a\,e\,x^3\,\ln \left (1-c^2\,x^2\right )}{3}-\frac {a\,e\,\ln \left (c\,x-1\right )}{3\,c^3}+\frac {a\,e\,\ln \left (c\,x+1\right )}{3\,c^3}+\frac {b\,d\,\ln \left (c\,x-1\right )}{6\,c^3}+\frac {b\,d\,\ln \left (c\,x+1\right )}{6\,c^3}-\frac {11\,b\,e\,\ln \left (c\,x-1\right )}{18\,c^3}-\frac {11\,b\,e\,\ln \left (c\,x+1\right )}{18\,c^3}-\frac {b\,e\,\ln \left (c\,x+1\right )\,\ln \left (-\frac {2\,a\,e-2\,a\,c\,e\,x}{3\,c^2}\right )}{6\,c^3}-\frac {b\,e\,\ln \left (c\,x+1\right )\,\ln \left (-\frac {2\,a\,e+2\,a\,c\,e\,x}{3\,c^2}\right )}{6\,c^3}-\frac {b\,e\,\ln \left (1-c\,x\right )\,\ln \left (-\frac {2\,a\,e-2\,a\,c\,e\,x}{3\,c^2}\right )}{6\,c^3}-\frac {b\,e\,\ln \left (1-c\,x\right )\,\ln \left (-\frac {2\,a\,e+2\,a\,c\,e\,x}{3\,c^2}\right )}{6\,c^3}-\frac {b\,e\,x\,\ln \left (c\,x+1\right )}{3\,c^2}+\frac {b\,e\,x\,\ln \left (1-c\,x\right )}{3\,c^2}+\frac {b\,e\,x^2\,\ln \left (1-c^2\,x^2\right )}{6\,c}+\frac {b\,e\,\ln \left (-\frac {2\,a\,e-2\,a\,c\,e\,x}{3\,c^2}\right )\,\ln \left (1-c^2\,x^2\right )}{6\,c^3}+\frac {b\,e\,\ln \left (-\frac {2\,a\,e+2\,a\,c\,e\,x}{3\,c^2}\right )\,\ln \left (1-c^2\,x^2\right )}{6\,c^3}+\frac {b\,e\,x^3\,\ln \left (c\,x+1\right )\,\ln \left (1-c^2\,x^2\right )}{6}-\frac {b\,e\,x^3\,\ln \left (1-c\,x\right )\,\ln \left (1-c^2\,x^2\right )}{6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________